@include b(chat-toolbar) {
  display: flex;
  align-items: center;

  @include e(item) {
    display: flex;
    cursor: pointer;
    align-items: center;
    white-space: nowrap;

    &:not(:first-child) {
      margin-left: 6px;
    }

    @include m(icon) {
      width: 18px;
      height: 18px;
      display: flex;
      flex-shrink: 0;
      font-size: 18px;
      align-items: center;
      justify-content: center;
    }

    @include m(label) {
      display: flex;
      align-items: center;
    }

    @include when(disabled) {
      cursor: not-allowed;
    }

    @include when(loading) {
      pointer-events: none;
      animation: loading-change 0.8s infinite;
    }
  }

  @include e(circle) {
    .#{bem(chat-toolbar, item)} {
      width: 32px;
      height: 32px;
      padding: 6px;
      font-size: 12px;
      overflow: hidden;
      border-radius: 15px;
      transition: all 0.3s ease;
      border: 1px solid #{getCssVar('ai-chat', 'border-color')};

      &.is-disabled {
        color: #{getCssVar('ai-chat', 'disabled-color')};
      }

      &:hover:not(.is-disabled) {
        width: 68px;
        color: #{getCssVar('ai-chat', 'hover-color')};
        background-color: #{getCssVar('ai-chat', 'hover-background-color')};
      }

      .#{bem(chat-toolbar, item, label)} {
        font-size: 14px;
        margin-left: 8px;
        width: calc(100% - 32px);
        > * {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }
    }
  }

  @include e(default) {
    .#{bem(chat-toolbar, item)} {
      gap: 6px;
      z-index: 1;
      font-size: 14px;
      width: fit-content;
      padding: 2px 14px;
      line-height: 28px;
      border-radius: 12px;
      color: #{getCssVar('ai-chat', 'color-2')};
      background-color: #{getCssVar('ai-chat', 'background-color-2')};

      &.is-disabled {
        background-color: #{getCssVar('ai-chat', 'disabled-color')};
      }

      &:hover:not(.is-disabled) {
        background-color: #{getCssVar('ai-chat', 'hover-background-color-2')};
      }
    }
  }
}
